      function pval = hitrate_pvalue(hrate,prob, N)
          se = sqrt(prob*(1-prob)/N);
          
          if prob > 0.5
              prob = 1 - prob;
          end
          z_stat = -abs(hrate-prob)/se; 
          pval = normcdf(z_stat)*2;
%          pval_stars = NaN;
%           if pval <= 0.01 
%               pval_stars = '***';
%           end
%           if (0.01 < pval) && (pval <= 0.05) 
%               pval_stars = '**';
%           end
%           if (0.05 < pval) && (pval <= 0.1) 
%               pval_stars = '*';
%           end
           
      end
